/**
 * Company : Thai Informatic System Co., Ltd.
 * Created By : Dr.Tree
 * Created On : May 25, 2012  12:16:28 PM 
 * e-Mail : chatree@tis.co.th
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : apps.business.process.sales.transferofownership
 * File Name : TransferOfOwnershipProcessing.java
 * TODO
 */
package apps.business.process.sales.transferofownership;

import org.apache.log4j.Logger;

import apps.business.process.sales.booking.SalesBookingProcessing;

/**
 * @author chatree
 *
 */
public class TransferOfOwnershipProcessing {
	
	private static final Logger log = Logger.getLogger(TransferOfOwnershipProcessing.class);

	/**
	 * 
	 */
	public TransferOfOwnershipProcessing() {
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 		String company = "SP";
			String project = "SPLVILLE-PRAGSA";  //SPLCITY-SRI
			String BookingOrContarctNo = "CS-1206-000022-0"; //  "CS-1204-000009-0" // "BS-1204-000007"; //BS-1204-000016
			String status = "A";
			String syncIsstaging = null; //Can set value to [null]
			String issync = "Y";
	 * @param company
	 * @param project
	 * @param BookingOrContarctNo
	 * @param status
	 * @param syncIsstaging
	 * @param issync
	 * @throws Exception
	 */
	public void Processing(String company, String project, String BookingOrContarctNo, String status, String syncIsstaging, String issync) throws Exception {
		try{
			
			new SalesBookingProcessing().newProcessingSingle(company, project, BookingOrContarctNo, status, syncIsstaging, issync);
			
		}catch(Exception e)
		{
			log.error(e.getMessage());
			System.err.println(e.getMessage());
		}
	}

	/**
	 * 		String company = "SP";
			String project = "SPLVILLE-PRAGSA";  //SPLCITY-SRI
			String BookingOrContarctNo = "CS-1206-000022-0"; //  "CS-1204-000009-0" // "BS-1204-000007"; //BS-1204-000016
			String ReceipteddocumentNo = "RR-1206-000078";
			String status = "A";
			String syncIsstaging = null; //Can set value to [null]
			String issync = "Y";
	 * @param company
	 * @param project
	 * @param BookingOrContarctNo
	 * @param ReceipteddocumentNo
	 * @param status
	 * @param syncIsstaging
	 * @param issync
	 * @throws Exception
	 */
	public void Processing(String company, String project, String BookingOrContarctNo, String ReceipteddocumentNo, String status, String syncIsstaging, String issync) throws Exception {
		try{
			
			new SalesBookingProcessing().newProcessing(company, project, BookingOrContarctNo, ReceipteddocumentNo, status, null, syncIsstaging, issync);
			
		}catch(Exception e)
		{
			log.error(e.getMessage());
			System.err.println(e.getMessage());
		}
	}
	
	@Deprecated
	private void Start() throws Exception {
		try{
			
			SalesBookingProcessing obj = new SalesBookingProcessing();
			
			String company = "SP";
			String project = "SPLVILLE-PRAGSA";  //SPLCITY-SRI
			String BookingOrContarctNo = "CS-1206-000022-0"; //  "CS-1204-000009-0" // "BS-1204-000007"; //BS-1204-000016
			String ReceipteddocumentNo = "RR-1206-000078";
			String status = "A";
			String syncIsstaging = null; //Can set value to [null]
			String issync = "Y";
			
			obj.newProcessing(company, project, BookingOrContarctNo, ReceipteddocumentNo, status, null, syncIsstaging, issync);
			
		}catch(Exception e)
		{
			log.error(e.getMessage());
			System.err.println(e.getMessage());
		}
	}

	
//	/**
//	 * @param args
//	 */
//	public static void main(String[] args) {
//		// TODO Auto-generated method stub
//		
//		try{
//			
//			new TransferOfOwnershipProcessing().Start();
//			
//		}catch(Exception e)
//		{
//			e.printStackTrace();
//			log.error(e);
//		}
//	}

}
